package com.xyz.springbootjpademo;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.time.LocalDateTime;

@Entity(name= "user")
public class User{
    @Id
    private Integer id;
    private String username;
    private String email;
    private String password_hash;
    private String about_me;
    private LocalDateTime last_seen;

    public User() {
    }

    public User(Integer id, String username, String email, String password_hash, String about_me, LocalDateTime last_seen) {
        this.id = id;
        this.username = username;
        this.email = email;
        this.password_hash = password_hash;
        this.about_me = about_me;
        this.last_seen = last_seen;
    }
    
    public Integer getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword_hash() {
        return password_hash;
    }

    public void setPassword_hash(String password_hash) {
        this.password_hash = password_hash;
    }

    public String getAbout_me() {
        return about_me;
    }

    public void setAbout_me(String about_me) {
        this.about_me = about_me;
    }

    public LocalDateTime getLast_seen() {
        return last_seen;
    }

    public void setLast_seen(LocalDateTime last_seen) {
        this.last_seen = last_seen;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", email='" + email + '\'' +
                ", password_hash='" + password_hash + '\'' +
                ", about_me='" + about_me + '\'' +
                ", last_seen=" + last_seen +
                '}';
    }
}
